﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

using Entity = SoTaiChinh.Library.Entity;
using Business = SoTaiChinh.Library.Business;

public partial class templates_client_usercontrols_footer : System.Web.UI.UserControl
{
    DataTable dsDanhMuc = new DataTable();
    Business.DanhMuc  business = new Business.DanhMuc();
    Entity.DanhMuc entity = new Entity.DanhMuc();

    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            LoadDanhMuc();
        }
    }
    // Ham load menu duoi
    protected void LoadDanhMuc()
    {
        try
        {
            string str = "";
            dsDanhMuc = business.SelectDuoiCap();
            if (dsDanhMuc.Rows.Count > 0)
            {
                for (int i = 0; i < dsDanhMuc.Rows.Count; i++)
                {
                    str += "<li> ";
                    str += "<a href=\"#\">" + dsDanhMuc.Rows[i]["Ten"].ToString() + "</a>";
                    str += " </a>";
                }
            }
            menufooter.InnerHtml = str;
        }
        catch (Exception ex)
        {
            throw ex;
        }
    }
}
